package cn.admin.config.common.protocol;

abstract class DataClientResultElement implements ProtocolElement {

    public final String dataId;
    public final String clientId;
    public Error error = null;

    public String getClientId() {
        return this.clientId;
    }

    public boolean getResult() {
        return this.error == null;
    }

    public void setError(String err) {
        this.error = new Error(err);
    }

    public Error getError() {
        return this.error;
    }

    public abstract ProtocolElementUid uid();

    public DataClientResultElement(String dataId, String clientId) {
        this.dataId = dataId;
        this.clientId = clientId;
    }
}
